<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Interfaces\SolrService;

class Solr extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'solr';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '手动同步索引数据至solr服务器';

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle(SolrService $solrService)
    {

        $status = $solrService->dataImport();

        $this->comment(PHP_EOL.'SOLR数据同步请求发送状态:'.$status.PHP_EOL);
    }
}
